<script setup>
import { RouterLink, RouterView } from 'vue-router'
</script>

<template>
  <div class="app">
    <nav>
      <RouterLink to="/">首页</RouterLink> |
      <RouterLink to="/add">添加题目</RouterLink> |
      <RouterLink to="/practice">练习</RouterLink> |
      <RouterLink to="/admin">管理</RouterLink>
    </nav>

    <RouterView />
  </div>
</template>

<style scoped>
.app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

nav {
  padding: 20px 0;
  text-align: center;
}

nav a {
  margin: 0 10px;
  color: #2c3e50;
  text-decoration: none;
}

nav a.router-link-active {
  color: #42b983;
}
</style> 